#pragma once
#include <vector>
#include <list>
#include "CommonDef.h"

class CheckWin
{
public:
    CheckWin(const std::vector<Chess>& analyseChessVec);

    CheckWin(const std::vector<Chess>& analyseChessVec, const Chess & chess);

    ~CheckWin();

public:
    bool analyseChess2Win(std::vector<KindChess>& resualtVec);

private:
    const std::vector<Chess> findDDChess();

    bool analyseChess(std::vector<KindChess>& resualtVec, const Chess& eye);

    void checkEyeChess(std::list<Chess>& tmpChessLst, const Chess& eyeChess, std::vector<KindChess>& resualtVec);

    bool checkEEEChess(std::list<Chess>& tmpChessLst, std::vector<KindChess>& resualtVec);

    bool checkABCChess(std::list<Chess>& tmpChessLst, std::vector<KindChess>& resualtVec);
private:
    std::vector<Chess> m_analyseChessVec;
};

